<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>交易汇总</title>
		<link rel="stylesheet" href="__OEM__/css/iconfont.css" />
		<link rel="stylesheet" href="__OEM__/css/css.css" />
		<script src="__PUBLIC__/static/lib/echarts.min.js"></script>
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<div class="rigtop">
						<span class="title">交易汇总</span>
					</div>
					<div class="indrig_con">
						<div class="tongjbb_box">
							<div class="tongjititle">
								<p>统计报表</p>
							</div>
									<div class="tongji_typelist clearfix">
									<div class="tongji_typeitem" id="alipay" style="width: 20%;">
										<p class="tongji_type">会员(个)</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">今日<em style="color: red;margin-left: 5px;">{$today_mems}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本周<em style="color: red;margin-left: 5px;">{$week_mems}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本月<em style="color: red;margin-left: 5px;">{$month_mems}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">上月<em style="color: red;margin-left: 5px;">{$last_month_mems}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">累计<em style="color: red;margin-left: 5px;">{$mems}</em></span>
										</p>
									</div>
										<div class="tongji_typeitem" id="alipay" style="width: 20%;">
										<p class="tongji_type">交易流水(￥)</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">今日<em style="color: red;margin-left: 5px;">{$today_logs}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本周<em style="color: red;margin-left: 5px;">{$week_logs}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本月<em style="color: red;margin-left: 5px;">{$month_logs}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">上月<em style="color: red;margin-left: 5px;">{$last_month_logs}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">累计<em style="color: red;margin-left: 5px;">{$logs}</em></span>
										</p>
									</div>
									<div class="tongji_typeitem" id="wechat" style="width: 20%;">
										<p class="tongji_type">交易笔数(笔)</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">今日<em style="color: red;margin-left: 5px;">{$today_counts}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本周<em style="color: red;margin-left: 5px;">{$week_counts}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本月<em style="color: red;margin-left: 5px;">{$month_counts}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">上月<em style="color: red;margin-left: 5px;">{$last_month_counts}</em></span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">累计<em style="color: red;margin-left: 5px;">{$counts}</em></span>
										</p>
									</div>
									<div class="tongji_typeitem" id="alipay-bank" style="width: 35%;">
										<p class="tongji_type">鼓励金</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">今日
												<em style="color: red;margin-left: 5px;">回收{$today_scores1}</em>
												<em style="color: red;margin-left: 5px;">充值{$cz_info.today_total_cz?$cz_info.today_total_cz : 0}</em>
											</span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本周
												<em style="color: red;margin-left: 5px;">回收{$week_scores1}</em>
												<em style="color: red;margin-left: 5px;">充值{$cz_info.week_total_cz?$cz_info.week_total_cz : 0}</em>
											</span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">本月
												<em style="color: red;margin-left: 5px;">回收{$month_scores1}</em>
												<em style="color: red;margin-left: 5px;">充值{$cz_info.month_total_cz?$cz_info.month_total_cz : 0}</em>
											</span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">上月
												<em style="color: red;margin-left: 5px;">回收{$last_month_scores1}</em>
												<em style="color: red;margin-left: 5px;">充值{$cz_info.last_month_total_cz?$cz_info.last_month_total_cz : 0}</em>
											</span>
										</p>
										<p class="tongji_typribox">
											<span class="tongji_typri">累计
												<em style="color: red;margin-left: 5px;">回收{$total_scores1}</em>
												<em style="color: red;margin-left: 5px;">充值{$cz_info.all_total_cz?$cz_info.all_total_cz : 0}</em>
											</span>
										</p>
									</div>
								</div>
								{if $Think.session.user_level==1}<?php $width=16; ?>{/if}
								{if $Think.session.user_level==2}<?php $width=24.5; ?>{/if}
								{if $Think.session.user_level==3}<?php $width=33; ?>{/if}
								{if $Think.session.user_level==4}<?php $width=19.5; ?>{/if}
								<div class="tongji_typelist clearfix">
									    <div class="tongji_typeitem" id="alipay" style="width:{$width}%;">
												<p class="tongji_type"><a href="{:url('count/user_record')}">会员</a></p>
												<p class="tongji_typribox">
													<span class="tongji_numpri">{$data['mems']}人</span>
												</p>
										</div>
										<div class="tongji_typeitem" id="alipay" style="width:{$width}%;">
												<p class="tongji_type"><a href="{:url('count/agent_record')}">商家</a></p>
												<p class="tongji_typribox">
													<span class="tongji_numpri">{$data['agents']}家</span>
												</p>
										</div>
										<div class="tongji_typeitem" id="alipay" style="width:{$width}%;">
												<p class="tongji_type"><!-- <a href="{:url('count/sc_record')}"></a> -->市场专员</p>
												<p class="tongji_typribox">
													<span class="tongji_numpri">{$data['scs']}人</span>
												</p>
										</div>
										{if $Think.session.user_level==1 || $Think.session.user_level==2 || $Think.session.user_level==4}			
										<div class="tongji_typeitem" id="alipay" style="width:{$width}%;">
											
											<p class="tongji_type"><a href="{:url('count/city_record')}">区域运营商</a></p>
											<p class="tongji_typribox">
												<span class="tongji_numpri">{$data['oemlevel3']}家</span>
											</p>
										</div>
										{/if}
										{if $Think.session.user_level==1 ||  $Think.session.user_level==4}		
										<div class="tongji_typeitem" id="alipay"  style="width:{$width}%;">
												
												<p class="tongji_type"><a href="{:url('count/agency_record')}">市级代理商</a></p>
												<p class="tongji_typribox">
													<span class="tongji_numpri">{$data['oemlevel2']}家</span>
												</p>
												
										</div>
										{/if}
										{if $Think.session.user_level==1}
										<div class="tongji_typeitem" id="alipay-bank" style="width:{$width}%;">
													
												<p class="tongji_type"><!-- <a href="{:url('count/province_record')}"></a> -->省级代理商</p>
												<p class="tongji_typribox">
													<span class="tongji_numpri">{$data['oemlevel1']}家</span>
												</p>
												
											</div>
										{/if}
									</div>
						</div>
						<div id="main" style="height:400px; margin-top: 40px;"></div>
						<script type="text/javascript">
							// 基于准备好的dom，初始化echarts实例
							var mp = {
								$mp
							};
							var myChart = echarts.init(document.getElementById('main'));
							option = {
								title: {
									text: '交易数据分析',
									x: 'center'
								},
								tooltip: {
									trigger: 'item',
									formatter: "{a} <br/>{b} : {c} ({d}%)"
								},
								toolbox: {
									show: true,
									feature: {
										mark: {
											show: true
										},
										saveAsImage: {
											show: true
										}
									}
								},
								calculable: true,
								series: [

									{
										name: '面积模式',
										type: 'pie',
										radius: [20, 160],
										center: ['50%', '50%'],
										roseType: 'area',
										data: [{
											value: mp.sm,
											name: '扫码支付'
										}, {
											value: mp.sc,
											name: '商城交易'
										}, {
											value: mp.jz,
											name: '记账'
										}]
									}
								]
							};

							// 使用刚指定的配置项和数据显示图表。
							myChart.setOption(option);
						</script>
					</div>
				</div>
			</div>
		</div>
		<script src="__PUBLIC__/static/layui/layui.js" charset="utf-8"></script>
		<script>
			layui.use('laydate', function() {
				var laydate = layui.laydate;

				//常规用法
				laydate.render({
					elem: '#test1'
				});
			});
		</script>
		{include file="public/footer" /}
	</body>

</html>